package com.longge;

import java.util.function.IntBinaryOperator;
import java.util.stream.IntStream;

/**
 * @program: my-code
 * @description:
 * @author: longge
 * @create: 2021-04-27 02:32
 */
public class ArraySign {
    public int arraySign(int[] nums) {

        int res = 1;
        for (int num : nums) {
            if (num > 0 && res != 0) {
                res = res;
            }else if (num < 0 && res != 0) {
                res = -res;
            }else{
                res = 0;
            }
        }
        return res;
    }

    public static void main(String[] args) {
    }
}
